n-ary code